package com.zyb.eduservice.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zyb.commonutils.R;
import com.zyb.eduservice.entity.EduCourse;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zyb.eduservice.entity.frontvo.CourseFrontVo;
import com.zyb.eduservice.entity.frontvo.CourseWebVo;
import com.zyb.eduservice.entity.vo.CourseInfoVo;
import com.zyb.eduservice.entity.vo.CoursePublishVo;
import com.zyb.eduservice.entity.vo.CourseQuery;
import com.zyb.eduservice.entity.vo.TeacherQuery;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author testJava
 * @since 2022-04-02
 */
public interface EduCourseService extends IService<EduCourse> {
    String saveCourseInfo(CourseInfoVo courseInfoVo);

    CourseInfoVo getCourseInfo(String courseId);

    void updateCourseInfo(CourseInfoVo courseInfoVo);

    CoursePublishVo getAllCourseInfo(String courseId);

    IPage<EduCourse> pageCourseCondition(Long current, Long limit, CourseQuery courseQuery);

    void removeCourse(String courseId);

    //查询前8条课程
    List<EduCourse> cmsQueryCourse();

    //分页查询讲师课程的方法
    Map<String, Object> getCourseFrontList(Page<EduCourse> pageParam, CourseFrontVo courseFrontVo);

    //根据课程id，编写sql语句查询课程信息
    CourseWebVo getBaseCourseInfo(String courseId);
}
